package com.yonyougov.devops.cruxcisupport.userserver;

import com.yonyougov.devops.cruxcisupport.user.UserEntity;
import com.yonyougov.devops.cruxcisupport.userserver.vo.*;
import com.yonyougov.devops.fwc.api.dto.BaseResponseDto;
import com.yonyougov.devops.fwc.core.exception.BusinessException;
import com.yonyougov.devops.fwc.core.service.BaseService;

import java.math.BigInteger;
import java.util.List;

/**
 * t_user_server服务
 */
public interface UserServerService extends BaseService<UserServerEntity, BigInteger> {

    int countByUserServerLike(UserServerPageLikeReqVo userServerPageLikeReqVo);

    List<UserServerPageLikeRespVo> findUserServerPageLike(UserServerPageLikeReqVo userServerPageLikeReqVo);

    void deleteBatchUserServerByIds(UserEntity user, List<BigInteger> ids);

    BaseResponseDto addPublicKey(BigInteger userId, List<BigInteger> serverId);

    int countByUserLinkedServer(ServerLinkedUserPageLikeReqVo reqVo);

    List<ServerLinkedUserPageLikeRespVo> findUserLinkedServerPageLike(ServerLinkedUserPageLikeReqVo serverId);

    BaseResponseDto findServerPubKey(BigInteger serverId);

    void deleteServerPubKey(ServerDeletePubKeyReqVo pubKeyReqVo) throws BusinessException;

    void printPubKey();

    void execCommand(List<BigInteger> serverId, String command);

    void addAll(List<UserServerEntity> needAddUserServers);
    //<!--用户自定义代码开始-->

    //<!--用户自定义代码结束-->
}
